home *** CD-ROM | disk | FTP | other *** search
/ VRML 2.0 Sourcebook (2nd Edition) / VRML 2.0 Sourcebook CD [md5 fed90f4f9c39d5a60d477058775c7e21].iso / book / win / ch26 / torch1.wrl < prev    next >
Text File  |  1996-09-23  |  3KB  |  114 lines

  1. #VRML V2.0 utf8
  2. # The VRML 2.0 Sourcebook
  3. # Copyright [1997] By
  4. # Andrea L. Ames, David R. Nadeau, and John L. Moreland
  5. Transform {
  6.     translation 0.0 0.0 0.2
  7.     scale 0.5 0.5 0.5
  8.     children [
  9.     # Torch handle
  10.         Transform {
  11.             translation 0.0 -0.75 0.0
  12.             rotation 1.0 0.0 0.0 3.14
  13.             children Shape {
  14.                 appearance DEF Gray Appearance {
  15.                     material Material {
  16.                         diffuseColor  0.4 0.4 0.4
  17.                         specularColor 0.7 0.7 0.7
  18.                     }
  19.                 }
  20.                 geometry Cone {
  21.                     height 1.5
  22.                     bottomRadius 0.15
  23.                 }
  24.             }
  25.         },
  26.     # Fire pot
  27.         DEF Ring Shape {
  28.             appearance USE Gray
  29.             geometry Cylinder {
  30.                 height 0.1
  31.                 radius 0.4
  32.                 top    FALSE
  33.                 bottom FALSE
  34.             }
  35.         },
  36.         Transform { translation 0.0 0.2 0.0 children USE Ring },
  37.     # Fire pot detail
  38.         DEF Bar Shape {
  39.             appearance USE Gray
  40.             geometry IndexedFaceSet {
  41.                 coord Coordinate {
  42.                     point [
  43.                          0.04 0.00 0.38,  0.04 0.35 0.38,
  44.                         -0.04 0.35 0.38, -0.04 0.00 0.38,
  45.                     ]
  46.                 }
  47.                 coordIndex [ 0, 1, 2, 3 ]
  48.             }
  49.         },
  50.         Transform { rotation 0.0 1.0 0.0 -1.571 children USE Bar },
  51.         Transform { rotation 0.0 1.0 0.0 -0.785 children USE Bar },
  52.         Transform { rotation 0.0 1.0 0.0  0.785 children USE Bar },
  53.         Transform { rotation 0.0 1.0 0.0  1.571 children USE Bar },
  54.     # Mounting bracket
  55.         Transform {
  56.             translation 0.0 -0.35 0.0
  57.             children [
  58.                 Shape {
  59.                     appearance USE Gray
  60.                     geometry Cylinder {
  61.                         height 0.15
  62.                         radius 0.20
  63.                     }
  64.                 },
  65.                 Transform {
  66.                     translation 0.0 0.0 -0.2
  67.                     children Shape {
  68.                         appearance USE Gray
  69.                         geometry Box { size 0.45 0.25 0.39 }
  70.                     }
  71.                 }
  72.             ]
  73.         },
  74.     # Flames
  75.         DEF Flames Shape {
  76.             # No appearance, use emissive shading
  77.             geometry IndexedFaceSet {
  78.                 coord Coordinate {
  79.                     point [
  80.                          0.25 0.0 0.00,  0.15 1.0 0.10,
  81.                          0.05 0.0 0.15,  0.18 0.0 0.05,
  82.                          0.00 1.2 0.05, -0.10 0.0 0.05,
  83.                         -0.00 0.0 0.15, -0.13 0.8 0.10,
  84.                         -0.25 0.0 0.00,
  85.                     ]
  86.                 }
  87.                 color Color {
  88.                     color [
  89.                         1.0 0.0 0.0,  0.9 0.5 0.0,
  90.                         1.0 0.0 0.0,  0.9 0.3 0.0,
  91.                         1.0 1.0 0.0,  0.9 0.3 0.0,
  92.                         0.7 0.1 0.2,  0.9 0.8 0.0,
  93.                         1.0 0.0 0.0,
  94.                     ]
  95.                 }
  96.                 coordIndex [
  97.                     0, 1, 2, -1,  3, 4, 5, -1,  6, 7, 8, -1,
  98.                 ]
  99.             }
  100.         },
  101.     # Additional Flames
  102.         Transform {
  103.             rotation 0.0 1.0 0.0 1.57
  104.             scale    0.9 0.9 1.0
  105.             children USE Flames
  106.         },
  107.         Transform {
  108.             rotation 0.0 1.0 0.0 -1.57
  109.             scale    0.9 0.9 1.0
  110.             children USE Flames
  111.         }
  112.     ]
  113. }
  114.